export const UNKNOWN_ERROR = '未知错误';
// [综合map-page] ,  整卷信息--表头
export const WHOLE_ROLL_INFO = [
  {
    name: '涂层批号',
    key: 'layerId',
    width: 250,
    unit: ''
  },
  {
    name: '卷长',
    key: 'height',
    width: 160,
    unit: 'm'
  },
  {
    name: '幅宽',
    key: 'width',
    width: 160,
    unit: 'mm'
  }
];

// [综合map-page]  分条信息展示字段:label
export const SLIT_INFO_NAME = {
  lotId: '分条号',
  TD_between: 'TD区间',
  MD_between: 'MD区间',
  dimensions_between: '尺寸规格',
  oneCut: '1m Cut',
  yield: 'yield',
  okRatio: '良品率',
  areaUseRatoi: '面积利用率'
};

// [综合map-page]  矩形的style样式公共
export const RECT_STYLE = {
  type: 'rect',
  shape: { x: 0, y: 0, width: 0, height: 0 },
  style: {
    fill: 'rgba(255, 0, 0, .0)',
    textPosition: 'inside',
    textDistance: 5,
    fontStyle: 'normal',
    fontWeight: 'normal',
    fontSize: 12,
    fontFamily: 'Microsoft YaHei',
    textFill: '#fff',
    textStroke: '#5470c6',
    textStrokeWidth: 2,
    text: null,
    legacy: true,
    stroke: 'red'
  },
  emphasis: { style: { fill: 'rgba(85, 255, 0, .6)' } },
  transition: ['shape'],
  textContent: {
    type: 'text',
    style: {
      textAlign: 'right',
      textVerticalAlign: 'top',
      fill: '#70B603',
      text: '',
      font: '12px Arial Normal'
    }
  }
};

// [marking-page] 字段配置
export const MARK_FIELD_SET = {
  layerId: {
    value: 'layerId',
    label: '前制程LOT'
  },
  grad: {
    value: 'grad',
    label: 'Grade'
  },
  slitId: {
    value: 'lotId',
    label: 'Slit LOT && RTP LOT'
  },
  dimensionsSize: {
    value: 'dimensionsSize',
    label: '尺寸规格'
  },
  lotHeight: {
    value: 'lotHeight',
    label: '卷长(m)'
  },
  yield: {
    value: 'yield',
    label: 'Yield'
  },
  markingSum: {
    value: 'markingSum',
    label: '卷Marking理论数量'
  },
  polMarkingSum: {
    value: 'polMarkingSum',
    label: '卷Marking检出数量'
  },
  polPositionExactSum: {
    value: 'polPositionExactSum',
    label: '检出位置准确量'
  },
  polPositionExactRatio: {
    value: 'polPositionExactRatio',
    label: '位置准确率'
  },
  polPatternExactSum: {
    value: 'polPatternExactSum',
    label: '检出样式准确数'
  },
  polPatternExactRatio: {
    value: 'polPatternExactRatio',
    label: '检出样式准确率'
  },
  polPiantiehouOkSum: {
    value: 'polPiantiehouOkSum',
    label: '检出判定OK数'
  },
  polPiantiehouOkRatio: {
    value: 'polPiantiehouOkRatio',
    label: '检出结果OK率'
  },
  model: {
    value: 'model',
    label: 'Model'
  },
  markingType: {
    value: 'markingType',
    label: '不良名称'
  },
  markingCount: {
    value: 'markingCount',
    label: 'Marking数量'
  },
  markingExactCount: {
    value: 'markingExactCount',
    label: 'Marking准确数'
  },
  markingExactRatio: {
    value: 'markingExactRatio',
    label: 'Marking准确率'
  },
  piantiehouNgPanelMarkingCount: {
    value: 'piantiehouNgPanelMarkingSum',
    label: '偏贴后NG数量'
  },
  polCheckCount: {
    value: 'polCheckCount',
    label: 'POL检出量'
  },
  polCheckRatio: {
    value: 'polCheckRatio',
    label: 'POL检出率'
  },
  polMissCount: {
    value: 'polMissCount',
    label: 'POL漏检量'
  },
  polMissRatio: {
    value: 'polMissRatio',
    label: 'POL漏检率'
  },
  markingOverCount: {
    value: 'markingOverCount',
    label: 'Marking过检数'
  },
  markingOverRatio: {
    value: 'markingOverRatio',
    label: 'Marking过检率'
  }
};

// [marking-page]
export const MARK_FIELD_DEFAULT = ['layerId', 'grad', 'slitId', 'dimensionsSize', 'layerLength', 'yield', 'markingSum', 'polExactMarkingCount'];

// [marking-page] marking小卷slit的表头，展开后的表头
export const MARK_COLUMN_OBJ = {
  layerId: {
    title: '前制程LOT',
    dataIndex: 'layerId',
    key: 'layerId'
  },
  grad: {
    title: 'Grade',
    dataIndex: 'grad',
    key: 'grad'
  },
  lotId: {
    title: 'Slit LOT && RTP LOT',
    dataIndex: 'lotId',
    key: 'lotId'
  },
  dimensionsSize: {
    title: '尺寸',
    dataIndex: 'dimensionsSize',
    key: 'dimensionsSize'
  },
  lotHeight: {
    title: '卷长(m)',
    dataIndex: 'lotHeight',
    key: 'lotHeight'
  },
  yield: {
    title: 'Yield',
    dataIndex: 'yield',
    key: 'yield'
  },
  markingSum: {
    title: '卷Marking理论数量',
    dataIndex: 'markingSum',
    key: 'markingSum'
  },
  polMarkingSum: {
    title: '卷Marking检出数量',
    dataIndex: 'polMarkingSum',
    key: 'polMarkingSum'
  },
  polPositionExactSum: {
    title: '检出位置准确量',
    dataIndex: 'polPositionExactSum',
    key: 'polPositionExactSum'
  },
  polPositionExactRatio: {
    title: '位置准确率',
    dataIndex: 'polPositionExactRatio',
    key: 'polPositionExactRatio'
  },
  polPatternExactSum: {
    title: '检出样式准确数',
    dataIndex: 'polPatternExactSum',
    key: 'polPatternExactSum'
  },
  polPatternExactRatio: {
    title: '检出样式准确率',
    dataIndex: 'polPatternExactRatio',
    key: 'polPatternExactRatio'
  },
  polPiantiehouOkSum: {
    title: '检出判定OK数',
    dataIndex: 'polPiantiehouOkSum',
    key: 'polPiantiehouOkSum'
  },
  polPiantiehouOkRatio: {
    title: '检出结果OK率',
    dataIndex: 'polPiantiehouOkRatio',
    key: 'polPiantiehouOkRatio'
  },
  markingExactCount: {
    title: 'Marking准确数',
    dataIndex: 'markingExactCount',
    key: 'markingExactCount'
  },
  model: {
    title: 'Model',
    dataIndex: 'model',
    key: 'model'
  },
  markingType: {
    title: '不良名称',
    dataIndex: 'markingType',
    key: 'markingType'
  },
  markingCount: {
    title: 'Marking数量',
    dataIndex: 'markingCount',
    key: 'markingCount'
  },
  markingExactRatio: {
    title: 'Marking准确率',
    dataIndex: 'markingExactRatio',
    key: 'markingExactRatio'
  },
  markingOverCount: {
    title: 'Marking过检数',
    dataIndex: 'markingOverCount',
    key: 'markingOverCount'
  },
  markingOverRatio: {
    title: 'Marking过检率',
    dataIndex: 'markingOverRatio',
    key: 'markingOverRatio'
  },
  polCheckCount: {
    title: 'POL检出量',
    dataIndex: 'polCheckCount',
    key: 'polCheckCount'
  },
  polCheckRatio: {
    title: 'POL检出率',
    dataIndex: 'polCheckRatio',
    key: 'polCheckRatio'
  },
  polMissCount: {
    title: 'POL漏检量',
    dataIndex: 'polMissCount',
    key: 'polMissCount'
  },
  polMissRatio: {
    title: 'POL漏检率',
    dataIndex: 'polMissRatio',
    key: 'polMissRatio'
  },
  piantiehouNgPanelMarkingSum: {
    title: '偏贴后NG数量',
    dataIndex: 'piantiehouNgPanelMarkingSum',
    key: 'piantiehouNgPanelMarkingSum'
  }
};

// [marking-page] // 涂层批号的信息==大卷的头部
export const MARK_LAYER_COLUMNS = [
  { title: '前制程LOT', dataIndex: 'layerId', key: 'layerId' },
  { title: 'Grade', dataIndex: 'grad', key: 'grad' },
  { title: '卷长(m)', dataIndex: 'layerHeight', key: 'layerHeight' },
  { title: 'Marking理论数量', dataIndex: 'layerMarkingSum', key: 'layerMarkingSum' },
  { title: 'Marking检出数量', dataIndex: 'layerPolMarkingSum', key: 'layerPolMarkingSum' },
  { title: '检出位置准确量', dataIndex: 'layerPolPositionExactSum', key: 'layerPolPositionExactSum' },
  { title: '位置准确率', dataIndex: 'layerPolPositionExactRatio', key: 'layerPolPositionExactRatio' },
  { title: '检出样式准确数', dataIndex: 'layerPolPatternExactSum', key: 'layerPolPatternExactSum' },
  { title: '检出样式准确率', dataIndex: 'layerPolPatternExactRatio', key: 'layerPolPatternExactRatio' },
  { title: '检出判定OK数', dataIndex: 'layerPolPiantiehouOkSum', key: 'layerPolPiantiehouOkSum' },
  { title: '检出结果OK率', dataIndex: 'layerPolPiantiehouOkRatio', key: 'layerPolPiantiehouOkRatio' }
];

// [lot-detail] slit详情--头部label:
export const LOT_HEAD_LABEL_OBJ = {
  layerId: {
    label: '前道卷批号',
    key: 'layerId',
    value: ''
  },
  lotId: {
    label: '分条号',
    key: 'lotId',
    value: ''
  },
  dimensionsSize: {
    label: '尺寸规格',
    key: 'dimensionsSize',
    value: ''
  },
  sheetSum: {
    label: '切片数',
    key: 'sheetSum',
    value: ''
  },
  sheetOkNum: {
    label: 'POLOK数',
    key: 'sheetOkNum',
    value: ''
  },
  panelOkNum: {
    label: '偏贴后OK数',
    key: 'panelOkNum',
    value: ''
  },
  okRatio: {
    label: '良品率',
    key: 'okRatio',
    value: ''
  }
};

// [lot-detail] 缺陷卡片显示的内容

export const FLAW_CARD_LABEL = {
  uid: {
    name: '编号',
    key: 'uid'
  },
  flawType: {
    name: '缺陷类型',
    key: 'flawType'
  },
  diameter: {
    name: '直径',
    key: 'diameter'
  },
  area: {
    name: '面积',
    key: 'area'
  },
  genTime: {
    name: '时间',
    key: 'genTime'
  }
};

export const imgUrl = 'https://img1.baidu.com/it/u=413643897,2296924942&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500';

// 缺陷卡片详情
export const FLAW_CARD_DETAIL = {
  uid: {
    name: '编号',
    key: 'uid'
  },
  flawType: {
    name: '缺陷类型',
    key: 'flawType'
  },
  diameter: {
    name: '直径',
    key: 'diameter'
  },
  area: {
    name: '面积',
    key: 'area'
  },
  genTime: {
    name: '时间',
    key: 'genTime'
  },
  //   -------------
  cameraId: {
    name: '相机ID',
    key: 'cameraId'
  },
  imgPath: {
    name: 'flawDatPath',
    key: 'imgPath'
  },
  station: {
    name: '检测工站',
    key: 'station'
  },
  doffCd: {
    name: 'doffCd',
    key: 'doffCd'
  },
  doffMd: {
    name: 'doffMd',
    key: 'doffMd'
  }
};

// 单位毫米转成 米，需要除以的值
export const UNIT_TO_M = 1000;
